/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package assignment_cp3120.user.edituser;

import assignment_cp3120.auth.Authenticate;
import assignment_cp3120.user.registeruser.RegisterUserModel;

/**
 *
 * @author Administrator
 */
public class EditUserModel extends RegisterUserModel {
    private String previousUsername;

    public EditUserModel() {
        previousUsername = Authenticate.getInstance().getUsername();
    }
    @Override public boolean isUniqueUsername(){
        boolean unique = true;
        
        unique = super.isUniqueUsername();
        
        if(previousUsername.equals(getUsername())){
            unique = true;
        }        
        return unique;
    }
}
